// Register.h: interface for the CRegister class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_REGISTER_H__E921BDF8_3C8E_4641_916B_018C23669E2B__INCLUDED_)
#define AFX_REGISTER_H__E921BDF8_3C8E_4641_916B_018C23669E2B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CRegister  
{
public:
	static CRegister * GetInstance()
	{
		if (!_singleton)
			_singleton = new CRegister;
		return _singleton;
	}
	bstr_t get_Source() 
	{
		return m_src.copy();
	}
	bstr_t get_Catalog() 
	{
		return m_cat.copy();
	}
	bstr_t get_User() 
	{
		return m_usr.copy();
	}
	bstr_t get_Password() 
	{
		return m_pwd.copy();
	}
protected:
	CRegister();
	virtual ~CRegister();
private:
	static CRegister * _singleton;
	HKEY m_handle;
	CRegKey m_reg;

	bstr_t m_src, m_cat, m_usr, m_pwd;
};

#endif // !defined(AFX_REGISTER_H__E921BDF8_3C8E_4641_916B_018C23669E2B__INCLUDED_)
